package com.kingdee.eas.jky.crm.app;

import org.apache.log4j.Logger;
import javax.ejb.*;
import java.rmi.RemoteException;
import java.util.Date;

import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;

import java.lang.String;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.custom.DefineProjectInfo;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;
import com.kingdee.eas.jky.crm.CluesManageCollection;
import com.kingdee.eas.jky.crm.CluesManageInfo;
import com.kingdee.eas.jky.enums.CheckoutEnum;
import com.kingdee.eas.jky.enums.StopEnum;
import com.kingdee.eas.jky.enums.YXStateEnum;
import com.kingdee.eas.jky.helper.DateHelper;
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
import com.kingdee.bos.metadata.entity.SorterItemCollection;
import com.kingdee.eas.framework.CoreBaseCollection;
import com.kingdee.eas.xr.XRBillBaseCollection;
import com.kingdee.eas.xr.XRBillBaseInfo;
import com.kingdee.bos.metadata.entity.FilterInfo;
import com.kingdee.eas.xr.app.XRBillBaseControllerBean;
import com.kingdee.eas.xr.app.XRBillStatusEnum;
import com.kingdee.eas.framework.CoreBillBaseCollection;
import com.kingdee.eas.framework.CoreBaseInfo;
import com.kingdee.eas.framework.ObjectBaseCollection;

public class CluesManageControllerBean extends AbstractCluesManageControllerBean
{
    private static Logger logger =
        Logger.getLogger("com.kingdee.eas.jky.crm.app.CluesManageControllerBean");
    protected void _audit(Context ctx, IObjectPK pk)throws BOSException, EASBizException
    {
         super._audit(ctx, pk);
    }
    protected void _unAudit(Context ctx, IObjectPK pk)throws BOSException, EASBizException
    {
         super._unAudit(ctx, pk);
    }
    protected void _unAudit(Context ctx, IObjectPK[] pks)throws BOSException, EASBizException
    {
         super._unAudit(ctx, pks);
    }
    protected void _cluesSearch(Context ctx, IObjectValue model)throws BOSException
    {
    }
	protected void _cluesCheck(Context ctx, IObjectValue model)
			throws BOSException {
		
	}
	protected void _cancel(Context ctx, IObjectPK pk, IObjectValue model)
			throws BOSException, EASBizException {
		CluesManageInfo info = (CluesManageInfo)model;
		info.setYxState(YXStateEnum.wx);
		update(ctx, new ObjectUuidPK(info.getId()), info);
	}
	protected void _cancelCancel(Context ctx, IObjectPK pk, IObjectValue model)
			throws BOSException, EASBizException {
		super._cancelCancel(ctx, pk, model);
		CluesManageInfo info = (CluesManageInfo)model;
		info.setYxState(YXStateEnum.yx);
		info.setYxTime(DateHelper.getNextMonth(new Date()));
		update(ctx, new ObjectUuidPK(info.getId()), info);
	}
	
}